package dataextraction;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import util.ConfigurationBean;
import wordcloudtag.WordCloudTag;
import wordcloudtag.WordCloudTagBean;
import wordcloudtag.WordCloudTagTXTExporter;

public class MainDataExtraction {
	
	public static void main(String[] args) {
		List<Entry> allEntries = EntriesEnginesLoader.getInstance().getAllEntriesFromCSV();
		
		Map<String, WordCloudTag> mapWordCloudTag = WordCloudTagBean.getInstance().createWordCloudTag(allEntries);
		
		try {
			EntriesTXTExporter.getInstance().exporter(allEntries, ConfigurationBean.getInstance().get(ConfigurationBean.ALL_ENTRIES_OUTPUT_KEY));
			WordCloudTagTXTExporter.getInstance().exporter(mapWordCloudTag, ConfigurationBean.getInstance().get(ConfigurationBean.WORD_CLOUD_TAG_OUTPUT_KEY));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
